import request from '@/utils/request'

// 查询预警模板列表
export function listFormwork(query) {
  return request({
    url: '/control/formwork/list',
    method: 'get',
    params: query
  })
}

// 查询预警模板详细
export function getFormwork(id) {
  return request({
    url: '/control/formwork/' + id,
    method: 'get'
  })
}

// 新增预警模板
export function addFormwork(data) {
  return request({
    url: '/control/formwork',
    method: 'post',
    data: data
  })
}

// 修改预警模板
export function updateFormwork(data) {
  return request({
    url: '/control/formwork',
    method: 'put',
    data: data
  })
}

// 删除预警模板
export function delFormwork(id) {
  return request({
    url: '/control/formwork/' + id,
    method: 'delete'
  })
}
